home *** CD-ROM | disk | FTP | other *** search
/ SGI Freeware 1999 August / SGI Freeware 1999 August.iso / dist / fw_libungif.idb / usr / freeware / src / libungif / patches.z / patches
Encoding:
Text File  |  1999-04-16  |  9.4 KB  |  248 lines

  1. --- ./lib/getarg.c    Sun Sep  6 15:14:46 1998
  2. +++ ../libungif-4.1.0/./lib/getarg.c    Thu Mar 18 15:31:00 1999
  3. @@ -103,6 +103,9 @@
  4.  
  5.  #ifdef USE_VARARGS
  6.  #include <varargs.h>
  7. +#elif defined(STDC_HEADERS)
  8. +    /** MRB - Where stdarg exists use it    **/
  9. +#include <stdarg.h>
  10.  #endif /* USE_VARARGS */
  11.  
  12.  #ifndef __MSDOS__
  13. @@ -183,10 +186,20 @@
  14.  
  15.      strcpy(CtrlStrCopy, CtrlStr);
  16.  
  17. +    /** MRB - Where stdarg exists use it    **/
  18. +#ifdef STDC_HEADERS
  19. +   {va_list ap;
  20. +    va_start(ap, CtrlStr);
  21. +    for (i = 1; i <= MAX_PARAM; i++) Parameters[i-1] = va_arg(ap, int*);
  22. +    va_end(ap);
  23. +   }
  24. +#else
  25.      /* Using base address of parameters we access other parameters addr:  */
  26.      /* Note that me (for sure!) samples data beyond the current function  */
  27.      /* frame, but we accesson these set address only by demand.          */
  28.      for (i = 1; i <= MAX_PARAM; i++) Parameters[i-1] = (int *) *(i + &CtrlStr);
  29. +#endif /* STDC_HEADERS */
  30. +
  31.  #endif /* USE_VARARG */
  32.  
  33.      --argc; argv++;        /* Skip the program name (first in argv/c list). */
  34. --- ./lib/dgif_lib.c    Wed Jan 20 00:19:38 1999
  35. +++ ../libungif-4.1.0/./lib/dgif_lib.c    Thu Mar 18 15:30:02 1999
  36. @@ -360,12 +360,12 @@
  37.      if (GifFile->Image.ColorMap != NULL) {
  38.          sp->ImageDesc.ColorMap =
  39.                 (ColorMapObject *)malloc(sizeof (ColorMapObject));
  40. -        memcpy(&sp->ImageDesc.ColorMap, &GifFile->Image.ColorMap,
  41. +        memcpy(sp->ImageDesc.ColorMap, GifFile->Image.ColorMap,
  42.                 sizeof(ColorMapObject));
  43.          sp->ImageDesc.ColorMap->Colors =
  44.                 (GifColorType *)malloc(sizeof (GifColorType));
  45. -        memcpy(&sp->ImageDesc.ColorMap->Colors,
  46. -               &GifFile->Image.ColorMap->Colors, sizeof(GifColorType));
  47. +        memcpy(sp->ImageDesc.ColorMap->Colors,
  48. +               GifFile->Image.ColorMap->Colors, sizeof(GifColorType));
  49.      }
  50.      sp->RasterBits = (char *)NULL;
  51.      sp->ExtensionBlockCount = 0;
  52. @@ -940,7 +940,7 @@
  53.          ImageSize = sp->ImageDesc.Width * sp->ImageDesc.Height;
  54.  
  55.          sp->RasterBits
  56. -            = (GifPixelType*) malloc(ImageSize * sizeof(GifPixelType));
  57. +            = (char *) malloc(ImageSize * sizeof(GifPixelType));
  58.  
  59.          if (DGifGetLine(GifFile, sp->RasterBits, ImageSize)
  60.              == GIF_ERROR)
  61. --- ./util/gifcolor.c    Sun Sep  6 15:15:29 1998
  62. +++ ../libungif-4.1.0/./util/gifcolor.c    Thu Mar 18 14:26:29 1999
  63. @@ -73,6 +73,7 @@
  64.      ColorMapObject *ColorMap;
  65.      GifFileType *GifFile;
  66.      GifColorType    ScratchMap[256];
  67. +    int red, green, blue;
  68.  
  69.      if ((Error = GAGetArgs(argc, argv, CtrlStr,
  70.                 &GifQuietPrint,
  71. @@ -105,9 +106,10 @@
  72.      ColorMapSize = 0;
  73.      while (fscanf(stdin,
  74.            "%*3d %3d %3d %3d\n",
  75. -          &ScratchMap[ColorMapSize].Red,
  76. -          &ScratchMap[ColorMapSize].Green,
  77. -          &ScratchMap[ColorMapSize].Blue) == 3) {
  78. +          &red, &green, &blue) == 3) {
  79. +        ScratchMap[ColorMapSize].Red = red;
  80. +        ScratchMap[ColorMapSize].Green = green;
  81. +        ScratchMap[ColorMapSize].Blue = blue;
  82.          ColorMapSize++;
  83.      }
  84.  
  85. --- ./util/gif2ps.c    Sun Sep  6 15:15:27 1998
  86. +++ ../libungif-4.1.0/./util/gif2ps.c    Thu Mar 18 14:14:18 1999
  87. @@ -196,7 +196,7 @@
  88.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  89.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  90.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  91. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  92. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",ImageNum);
  93.              exit(-2);
  94.          }
  95.          if (GifFile->Image.Interlace) {
  96. --- ./util/gif2rgb.c    Sun Sep  6 15:15:28 1998
  97. +++ ../libungif-4.1.0/./util/gif2rgb.c    Thu Mar 18 14:14:38 1999
  98. @@ -171,7 +171,7 @@
  99.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  100.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  101.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  102. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  103. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",ImageNum);
  104.              exit(-2);
  105.          }
  106.          if (GifFile->Image.Interlace) {
  107. --- ./util/gifrsize.c    Sun Sep  6 15:15:31 1998
  108. +++ ../libungif-4.1.0/./util/gifrsize.c    Thu Mar 18 14:17:56 1999
  109. @@ -123,13 +123,13 @@
  110.      if (!YScaleFlag && ScaleFlag) YScale = Scale;
  111.  
  112.      if (XScale > MAX_SCALE) {
  113. -    sprintf(s, "XScale too big, maximum scale selected instead (%d).",
  114. +    sprintf(s, "XScale too big, maximum scale selected instead (%f).",
  115.                                  MAX_SCALE);
  116.      GIF_MESSAGE(s);
  117.      XScale = MAX_SCALE;
  118.      }
  119.      if (YScale > MAX_SCALE) {
  120. -    sprintf(s, "YScale too big, maximum scale selected instead (%d).",
  121. +    sprintf(s, "YScale too big, maximum scale selected instead (%f).",
  122.                                  MAX_SCALE);
  123.      GIF_MESSAGE(s);
  124.      YScale = MAX_SCALE;
  125. --- ./util/icon2gif.c    Sun Sep  6 15:15:32 1998
  126. +++ ../libungif-4.1.0/./util/icon2gif.c    Thu Mar 18 14:36:36 1999
  127. @@ -149,6 +149,7 @@
  128.      *ColorMap = GlobalColorMap;
  129.      char GlobalColorKeys[PRINTABLES], LocalColorKeys[PRINTABLES],
  130.      *KeyTable = GlobalColorKeys;
  131. +    int red, green, blue;
  132.  
  133.      char buf[BUFSIZ * 2], InclusionFile[64];
  134.      GifFileType *GifFileOut;
  135. @@ -248,11 +249,11 @@
  136.      }
  137.  
  138.      else if (sscanf(buf, "    rgb %d %d %d is %c",
  139. -           &ColorMap[ColorMapSize].Red,
  140. -           &ColorMap[ColorMapSize].Green,
  141. -           &ColorMap[ColorMapSize].Blue,
  142. -           &KeyTable[ColorMapSize]) == 4)
  143. +           &red, &green, &blue, &KeyTable[ColorMapSize]) == 4)
  144.      {
  145. +        ColorMap[ColorMapSize].Red = red;
  146. +        ColorMap[ColorMapSize].Green = green;
  147. +        ColorMap[ColorMapSize].Blue = blue;
  148.          ColorMapSize++;
  149.      }
  150.  
  151. @@ -425,7 +426,7 @@
  152.          if (!GifQuietPrint)
  153.          putc('\n', stderr);
  154.  
  155. -        NewImage->RasterBits = Raster;
  156. +        NewImage->RasterBits = (char *) Raster;
  157.      }
  158.      else if (sscanf(buf, "comment"))
  159.      {
  160. --- ./util/gifrotat.c    Sun Sep  6 15:15:31 1998
  161. +++ ../libungif-4.1.0/./util/gifrotat.c    Thu Mar 18 14:27:45 1999
  162. @@ -177,7 +177,7 @@
  163.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  164.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  165.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  166. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  167. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",ImageNum);
  168.              exit(-2);
  169.          }
  170.          if (GifFile->Image.Interlace) {
  171. --- ./util/gifclrmp.c    Sun Sep  6 15:15:29 1998
  172. +++ ../libungif-4.1.0/./util/gifclrmp.c    Thu Mar 18 14:27:26 1999
  173. @@ -316,9 +316,11 @@
  174.  
  175.      /* Read the translation table in TranslateFile: */
  176.      for (i = 0; i < ColorMap->ColorCount; i++) {
  177. +        int tmp;
  178.          if (feof(TranslateFile))
  179.          GIF_EXIT("Color file to load color map from, too small.");
  180. -        fscanf(TranslateFile, "%3d %3d\n", &Dummy, &Translation[i]);
  181. +        fscanf(TranslateFile, "%3d %3d\n", &Dummy, &tmp);
  182. +        Translation[i] = tmp;
  183.          if (Translation[i] > Max)
  184.          Max = Translation[i];
  185.      }
  186. --- ./util/gif2x11.c    Sun Sep  6 15:15:28 1998
  187. +++ ../libungif-4.1.0/./util/gif2x11.c    Thu Mar 18 14:28:06 1999
  188. @@ -210,7 +210,7 @@
  189.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  190.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  191.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  192. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  193. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",ImageNum);
  194.              exit(-2);
  195.          }
  196.          if (GifFile->Image.Interlace) {
  197. --- ./util/gif2epsn.c    Sun Sep  6 15:15:27 1998
  198. +++ ../libungif-4.1.0/./util/gif2epsn.c    Thu Mar 18 14:14:23 1999
  199. @@ -225,7 +225,7 @@
  200.              PROGRAM_NAME, ++ImageNum, Col, Row, Width, Height);
  201.          if (GifFile->Image.Left + GifFile->Image.Width > GifFile->SWidth ||
  202.             GifFile->Image.Top + GifFile->Image.Height > GifFile->SHeight) {
  203. -            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n");
  204. +            fprintf(stderr, "Image %d is not confined to screen dimension, aborted.\n",ImageNum);
  205.              exit(-2);
  206.          }
  207.          if (GifFile->Image.Interlace) {
  208. --- ./Makefile.in    Tue Feb  9 16:25:09 1999
  209. +++ ../libungif-4.1.0/./Makefile.in    Thu Mar 18 15:06:27 1999
  210. @@ -230,7 +230,7 @@
  211.      for tst in $(TESTS); do \
  212.        if test -f $$tst; then dir=.; \
  213.        else dir="$(srcdir)"; fi; \
  214. -      if $(TESTS_ENVIRONMENT) $$dir/$$tst; then \
  215. +      if $(TESTS_ENVIRONMENT) $$dir/$$tst $(TESTS_ARGS); then \
  216.          all=`expr $$all + 1`; \
  217.          echo "PASS: $$tst"; \
  218.        elif test $$? -ne 77; then \
  219. --- ./ChangeLog    Wed Jan 20 00:46:28 1999
  220. +++ ../libungif-4.1.0/./ChangeLog    Thu Mar 18 15:30:49 1999
  221. @@ -1,3 +1,15 @@
  222. +1999 05 Mar Michael R Brown <michael@arrakeen.demon.co.uk>
  223. +    * lib/getarg.c: Lines 107 and 189
  224. +      Added ifdef's to use stdarg when available. On dec-alpha the
  225. +      default code was causing programs to crash, probably because
  226. +      it assumes a stack that grows-up.
  227. +
  228. +1999 24 Feb Michael R Brown <michael@arrakeen.demon.co.uk>
  229. +    * lib/dgif_lib.c: Lines 363 and 367
  230. +      Bug reported by Steve Sanders, where &'s where causing the
  231. +      memcpy to overwrite the pointers. Fixed by removing the &'s
  232. +      so that memcpy overwrote the memory pointed to.
  233. +
  234.  1999 20 Jan Toshio Kuratomi <badger@prtr-13.ucsc.edu>
  235.          * Release 4.1.0
  236.  
  237. --- ./ltconfig    Thu Sep 10 03:42:47 1998
  238. +++ ../libungif-4.1.0/./ltconfig    Sat Mar 20 17:03:44 1999
  239. @@ -851,7 +851,7 @@
  240.      if test "$with_gcc" = yes; then
  241.        archive_cmds='$CC -shared -o $lib ${wl}-soname ${wl}$soname ${wl}-set_version ${wl}$verstring$libobjs'
  242.      else
  243. -      archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs'
  244. +      archive_cmds='$LD -shared -o $lib -soname $soname -set_version $verstring$libobjs$deplibs'
  245.      fi
  246.      hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
  247.      ;;
  248.